
<div class="row RowSpace" style="margin-bottom:20px;">
  <div class="LableDiv" style="width:50px;"><Btn class="BtnSave" value="保存" ng-click="btnSave()"></Btn></div>
  <div class="LableDiv" style="width:60px;"><Btn value="放弃" ng-click="btnCancel()"></Btn></div>
  <div class="LableDiv" style="width:50px;"><Btn class="BtnAdd" value="新增" ng-click="btnAdd()"></Btn></div>
  <div class="LableDiv" style="width:60px;"><Btn class="BtnDelete" value="删除" ng-click="btnDelete()"></Btn></div>
  <div class="LableDiv" style="width:50px;">
    <BtnFind DisplayName="查找" WindowTitle="工艺路线" module="Module.Routing">
      <Column type="0" width="150px" displayname="编码" valuefield="Code"></Column>
      <Column type="textbox" width="150px" displayname="名称" valuefield="Name"></Column>
      <Column type="textbox" width="200px" displayname="料品" valuefield="ItemMaster.Name"></Column>
    </BtnFind>
  </div>
  <div class="LableDiv" style="width:60px;"><Btn value="列表" ng-click="btnList()"></Btn></div>
  <div class="LableDiv" style="width:50px;"><Btn value="首页" ng-click="btnFirstPage()"></Btn></div>
  <div class="LableDiv" style="width:50px;"><Btn value="上页" ng-click="btnPrePage()"></Btn></div>
  <div class="LableDiv" style="width:50px;"><Btn value="下页" ng-click="btnNextPage()"></Btn></div>
  <div class="LableDiv" style="width:50px;"><Btn value="末页" ng-click="btnLastPage()"></Btn></div>
</div>
<div class="row RowSpace">
  <div class="LableDiv"><Label>编码</Label></div>
  <div class="InputDiv"><TextBox value="Module.Routing.FocusedRecord.Code" isempty="false"></TextBox></div>
  <div class="LableDiv"><Label>名称</Label></div>
  <div class="InputDiv"><TextBox value="Module.Routing.FocusedRecord.Name"></TextBox></div>
  <div class="LableDiv"><Label>料品</Label></div>
  <div class="InputDiv">
    <Refer EntityName="ItemMaster" WindowTitle="料品" key="Module.Routing.FocusedRecord.ItemMaster._id" value="Module.Routing.FocusedRecord.ItemMaster.Code" text="Module.Routing.FocusedRecord.ItemMaster.Name" ValueField="Code" TextField="Name">
      <Column type="0" width="150px" DisplayName="编码" valuefield="Code"></Column>
      <Column type="textbox" width="150px" DisplayName="名称" valuefield="Name"></Column>
      <Column type="dropdownlist" DisplayName="分类" width="150px" ValueField='ItemCategory' Enum="ItemCategoryEnum"></Column>
      <Column DisplayName="规格" width="150px" ValueField="Specification"></Column>
    </Refer>
  </div>
  <div class="LableDiv"><Label>生效</Label></div>
  <div class="InputDiv"><CheckBox value="Module.Routing.FocusedRecord.IsEffective"></CheckBox></div>
</div>

<div class="row RowSpace" style="margin-top:20px;">
  <DataGrid module="Module.Operation" addrow="addRow()" cellvaluechange="cellValueChange(columnName, newValue, oldValue)" height="400px">
      <NumberBoxColumn minvalue="0" round="{Precision: 0}" DisplayName="行号" width="50px" valuefield="Sequence"></NumberBoxColumn>     
      <TextBoxColumn DisplayName="名称" width="150px" valuefield="Name"></TextBoxColumn>
      <ReferColumn EntityName="Work" Populate="{path: 'ConnectArea', select: 'Code Name'}" DisplayName="作业"  width="154px" WindowTitle="作业" KeyField="Work._id" ValueField="Work.Code" TextField="Work.Name" BindKeyField="_id" BindValueField="Code" BindTextField="Name">
        <Column type="0" width="60px" DisplayName="编码" valuefield="Code"></Column>
        <Column type="textbox" width="60px" DisplayName="名称" valuefield="Name"></Column>
        <Column type="TextBox" width="100px" DisplayName="交接区" valuefield="ConnectArea.Name" isfilter="false"></Column>
        <Column type="CheckBox" width="80px" DisplayName="上线控制" valuefield="IsOnlineControl"></Column>
        <Column type="CheckBox" width="80px" DisplayName="下线控制" valuefield="IsOfflineControl"></Column>
        <Column type="CheckBox" width="90px" DisplayName="完工报告点" valuefield="IsCompletePoint"></Column>
        <Column type="CheckBox" width="65px" DisplayName="质检点" valuefield="IsQCpoint"></Column>
        <Column type="TextBox" width="150px" DisplayName="备注" valuefield="Remark"></Column>
      </ReferColumn>
      <ReferColumn DisplayName="交接区" EntityName="ConnectArea" Condition="{IsEffective: true}" OrderBy="{Code: 1}" Populate="[{path: 'UpDepartment', select: 'Name'}, {path: 'DownDepartment', select: 'Name'}]"  WindowTitle="交接区" KeyField="ConnectArea._id" ValueField="ConnectArea.Code" TextField="ConnectArea.Name" BindKeyField="_id" BindValueField="Code" BindTextField="Name">
        <Column type="0" width="100px" displayname="编码" valuefield="Code"></Column>
        <Column type="textbox" width="150px" displayname="名称" valuefield="Name"></Column>
        <Column type="dropdownlist" width="100px" enum="DeliveryModeEnum" displayname="配送模式" valuefield="DeliveryMode"></Column>
        <Column type="dropdownlist" width="100px" enum="PushPullModeEnum" displayname="推拉模式" valuefield="PushPullMode"></Column>
        <Column type="textbox" width="100px" displayname="上游部门" valuefield="UpDepartment.Name" IsFilter="false"></Column>
        <Column type="textbox" width="100px" displayname="下游部门" valuefield="DownDepartment.Name" IsFilter="false"></Column>
      </ReferColumn>
      <NumberBoxColumn minvalue="0" round="{Precision: 2, RoundType: 3, RoundValue: 5}" DisplayName="准备工时" width="80px" valuefield="ReadyWorkHours"></NumberBoxColumn>
      <NumberBoxColumn minvalue="0" round="{Precision: 2, RoundType: 3, RoundValue: 5}" DisplayName="加工工时" width="80px" valuefield="MachinWorkHours"></NumberBoxColumn>
      <CheckBoxColumn DisplayName="上线控制" width="80px" ValueField="IsOnlineControl"></CheckBoxColumn>
      <CheckBoxColumn DisplayName="下线控制" width="80px" ValueField="IsOfflineControl"></CheckBoxColumn>
      <CheckBoxColumn DisplayName="完工报告点" width="90px" ValueField="IsCompletePoint"></CheckBoxColumn>
      <CheckBoxColumn DisplayName="质检点" width="65px" ValueField="IsQCpoint"></CheckBoxColumn>
      <CheckBoxColumn DisplayName="看板驱动" width="80px" ValueField="IsDrive"></CheckBoxColumn>
      <NumberBoxColumn DisplayName="扫描次数" width="80px" IsEdit="false" valuefield="ScanCounts" MinValue="0" Round="{Precision: 0}"></NumberBoxColumn>
  </DataGrid>
</div>